<!--
/**
 * 知识库内容 列表页 JS 脚本
 * @author 金杰 , maillank@qq.com
 * @since 2021-11-16 21:14:42
 */
 -->
 <!DOCTYPE html>
<html style="background-color: #FFFFFF;">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
	<title th:text="${lang.translate('知识库内容')}">知识库内容</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css" th:href="'/assets/libs/layui/css/layui.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/css/admin.css" th:href="'/assets/css/admin.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/libs/toast/css/toast.css" type="text/css" th:href="'/assets/libs/toast/css/toast.css?'+${cacheKey}">
    <link rel="stylesheet" href="/assets/css/foxnic-web.css" th:href="'/assets/css/foxnic-web.css?'+${cacheKey}"/>
    <link href="/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css" th:href="@{/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css}" rel="stylesheet"/>
    <script th:inline="javascript">var foxnic_cachekey=[[${cacheKey}]];</script>    <link th:if(theme.ico!="null") rel="shortcut icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon"> <link th:if(theme.ico!="null") rel="icon" th:href="theme.ico" type="image/vnd.microsoft.icon">
    <link th:each="css:${theme.css}" rel="stylesheet" th:href="${css}+'?'+${cacheKey}">
    <style>
    </style>
</head>

<body style="overflow-y: hidden;">
<div class="form-container" >

    <form id="data-form" lay-filter="data-form" class="layui-form model-form" style="display:none">

        <input name="id" id="id"  type="hidden"/>

         <!--开始：group 循环-->



        <div class="layui-row form-row">

             <!--开始：group 循环-->
            <div class="layui-col-xs4 form-column">


                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('分类')}">分类</div><div class="layui-required">*</div></div>
                        <div class="layui-input-block ">
                            <div id="categoryId" input-type="select" th:data="${'/service-knowledgebase/kn-category/query-list'}" extraParam="{}"></div>
                        </div>
                    </div>


                
                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('等级')}">等级</div><div class="layui-required">*</div></div>
                        <div class="layui-input-block ">
                            <div id="gradeId" input-type="select" th:data="${dict.toArray('kn_grade')}" extraParam="{}"></div>
                        </div>
                    </div>


                                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('标题')}">标题</div><div class="layui-required">*</div></div>
                        <div class="layui-input-block ">
                            <input lay-filter="title" id="title" name="title" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('标题') }" type="text" class="layui-input"    lay-verify="|required"  />
                        </div>
                    </div>

                <!--结束：栏次内字段循环-->
            </div>
             <!--开始：group 循环-->
            <div class="layui-col-xs4 form-column">


                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('是否显示')}">是否显示</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <input input-type="radio" type="radio" name="display" lay-filter="display" th:each="e,stat:${enum.toArray('com.dt.platform.constants.enums.knowledgebase.KnowledgebaseDisplayEnum')}" th:value="${e.code}" th:title="${e.text}" th:checked="${(e.code=='' || stat.index==0)?'yes':'no'}">
                    </div>
                </div>


                
                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('内容类型')}">内容类型</div><div class="layui-required">*</div></div>
                    <div class="layui-input-block ">
                        <input input-type="radio" type="radio" name="contentType" lay-filter="contentType" th:each="e,stat:${enum.toArray('com.dt.platform.constants.enums.knowledgebase.KnowledgebaseContentTypeEnum')}" th:value="${e.code}" th:title="${e.text}" th:checked="${(e.code=='' || stat.index==0)?'yes':'no'}">
                    </div>
                </div>


                                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('链接地址')}">链接地址</div></div>
                        <div class="layui-input-block ">
                            <input lay-filter="linkAddress" id="linkAddress" name="linkAddress" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('链接地址') }" type="text" class="layui-input"  />
                        </div>
                    </div>

                <!--结束：栏次内字段循环-->
            </div>
             <!--开始：group 循环-->
            <div class="layui-col-xs4 form-column">

                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('关键字')}">关键字</div></div>
                        <div class="layui-input-block ">
                            <input lay-filter="keyWords" id="keyWords" name="keyWords" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('关键字') }" type="text" class="layui-input"  />
                        </div>
                    </div>

                                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('标签')}">标签</div></div>
                        <div class="layui-input-block ">
                            <input lay-filter="label" id="label" name="label" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('标签') }" type="text" class="layui-input"  />
                        </div>
                    </div>

                <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->



        <div class="layui-row form-row">

             <!--开始：group 循环-->
            <div class="layui-col-xs6 form-column">


                    <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('简介')}">简介</div></div>
                    <div class="layui-input-block ">
                        <textarea lay-filter="profile" id="profile" name="profile" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('简介') }" class="layui-textarea" style="height: 120px" ></textarea>
                    </div>
                </div>


                <!--结束：栏次内字段循环-->
            </div>
             <!--开始：group 循环-->
            <div class="layui-col-xs6 form-column">


                <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('附件')}">附件</div></div>
                    <div class="layui-upload layui-input-block ">
                        <input input-type="upload" id="attach"  name="attach" lay-filter="attach" style="display: none">
                        <button type="button" class="layui-btn" id="attach-button" th:text="${lang.translate('选择附件')}">选择附件</button>
                        <div class="layui-upload-list" id="attach-file-list"></div>
                    </div>
                </div>



                <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->



        <div class="layui-row form-row">

             <!--开始：group 循环-->
            <div class="layui-col-xs12 form-column">


                    <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('知识内容')}">知识内容</div></div>
                    <div class="layui-input-block ">
                        <textarea lay-filter="content" id="content" name="content" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('知识内容') }" class="layui-textarea" style="height: 350px" ></textarea>
                    </div>
                </div>


                <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
        <!--结束：group循环-->

        <div style="height: 8px"></div>
        <div style="height: 300px"></div>


    </form>

</div>
<div class="model-form-footer">
    <button class="layui-btn layui-btn-primary" id="cancel-button" lay-filter="cancel-button" type="button" th:text="${lang.translate('取消')}" >取消</button>
    <button th:if="${perm.checkAnyAuth('kn_content:create','kn_content:update','kn_content:save')}" class="layui-btn" style="margin-right: 15px;display: none;"  id="submit-button" lay-filter="submit-button" lay-submit th:text="${lang.translate('保存')}">保存</button>
</div>

<script type="text/javascript" src="/module/global.js" th:src="'/module/global.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/jquery-3.2.1.min.js" th:src="'/assets/libs/jquery-3.2.1.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/pandyle.min.js" th:src="'/assets/libs/pandyle.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/layui/layui.js" th:src="'/assets/libs/layui/layui.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/toast/js/toast.js" th:src="'/assets/libs/toast/js/toast.js?'+${cacheKey}"></script>

<script th:inline="javascript">
    var LAYUI_TABLE_WIDTH_CONFIG = [[${layuiTableWidthConfig}]];
    var RADIO_CONTENTTYPE_DATA = [[${enum.toArray('com.dt.platform.constants.enums.knowledgebase.KnowledgebaseContentTypeEnum')}]];
    var RADIO_DISPLAY_DATA = [[${enum.toArray('com.dt.platform.constants.enums.knowledgebase.KnowledgebaseDisplayEnum')}]];
    var SELECT_GRADEID_DATA = [[${dict.toArray('kn_grade')}]];
    var VALIDATE_CONFIG={"gradeId":{"labelInForm":"等级","inputType":"select_box","required":true},"display":{"labelInForm":"是否显示","inputType":"radio_box","required":true},"title":{"labelInForm":"标题","inputType":"text_input","required":true},"contentType":{"labelInForm":"内容类型","inputType":"radio_box","required":true},"categoryId":{"labelInForm":"分类","inputType":"select_box","required":true}};
    var AUTH_PREFIX="kn_content";

    // 用户ID
    var EMPLOYEE_ID = [[${user.getUser().getActivatedEmployeeId()}]] ;
    // 用户姓名
    var EMPLOYEE_NAME = [[${user.getUser().getActivatedEmployeeName()}]] ;

</script>



<script th:src="'/business/knowledgebase/content/content_ext.js?'+${cacheKey}"></script>
<script th:src="'/business/knowledgebase/content/content_form.js?'+${cacheKey}"></script>

</body>
</html>